<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_contract.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Mall_contract.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '合同列表',
        name: 'Mall_contract',
        url: '/Mall_contract/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        createDate: '',
        createID: '',
        id: '',
        merchantCode: '',
        merchantName: '',
        modifier: '',
        modifyDate: '',
        modifyID: '',
        name: '',
        Param: '',
        type: '',
        url: [],
        contractNoticetext: '',
      },
      editFormOptions: [
        [
          {
            title: '合同名称',
            maxSize: 1,
            required: true,
            field: 'name',
            type: 'text',
            colSize: '5',
          },
          { data: [], title: '合同类型', field: 'type', type: 'select', required: true },
        ],
        [
          {
            title: '上传合同',
            maxSize: 1,
            required: true,
            field: 'url',
            storage:'OSS_Y',
            type: 'img',
            colSize: '5',
            maxFile: 1, //图片个数
            multiple: true, //最多可选文件数量，必须multiple=true，才会生效
            hidden: true,
          },
        ],
        [{ title: '合同文本', field: 'contractNoticetext', type: 'editor', hidden: true, colSize: 12 }],
      ],
      searchFormFields: { name: '', createDate: '' },
      searchFormOptions: [
        [
          { title: '合同名称', field: 'name', type: 'like' },
          { title: '创建时间', field: 'createDate', type: 'datetime' },
        ],
      ],
      columns: [
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        { field: 'name', title: '合同名称', type: 'string', width: 220, align: 'left' },
        //  {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
        //  {field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
        //  {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
        //  {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
        { field: 'url', title: '地址', type: 'img', width: 220, align: 'left' },
        //  {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
        //  {field:'Param',title:'参数',type:'string',width:90,align:'left'},
        //  {field:'type',title:'类型',type:'int',width:90,align:'left'},
        { field: 'creator', title: '创建人', type: 'string', width: 180, align: 'left' },
        { field: 'modifier', title: '修改人', type: 'string', width: 180, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 90, align: 'left', sortable: true },
      ],

      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
